<?php
	class page_base {
		function on($p) {
			if (!isset($_GET["p"])&&($p=="home")) {
				return true;
			}
			if ($_GET['p'] == $p) {
				return true;
			}
			return false;
		}
		function width($i) {
			global $oh_object_page;
			$this->page['width'] = $i;
			return $oh_object_page;
		}
		function get_width() {
			if (isset($this->page["width"])) {
				return (String) $this->page["width"];
			} else {
				return "800";	
			}
		}
		function html_title($i) {
			global $oh_object_page;
			$this->page['html_title'] = $i;
			return $oh_object_page;
		}
		function menu($i) {
			if (!is_array($i)) $i = oh_string_to_array($i);			
			global $oh_object_page;
			$this->page['header_menu'] = $i;
			return $oh_object_page;			
		}
		function header_menu($i) {return $this->menu($i);}
		function get_header_menu() {
			if (isset($this->page["header_menu"])) {
				return $this->page["header_menu"];
			} else {
				return array(
					"Dashboard" => "",
				);	
			}
		}
		function header_title($i) {
			global $oh_object_page;
			$this->page['header_title'] = $i;
			return $oh_object_page;
		}
		function header_right($i) {
			global $oh_object_page;
			$this->page['header_right'] = $i;
			return $oh_object_page;
		}
		function content_title($i) {
			global $oh_object_page;
			$this->page['content_title'] = $i;
			return $oh_object_page;
		}
		function content_body($i) {
			global $oh_object_page;
			if (oh_is_valid_function($i)) {
				$this->func['content_body'] = $i;
			} else {
				$this->page['content_body'] = $i;
			}
			return $oh_object_page;
		}		
		function content($i) {return $this->content_body($i);}
		function sidebar($i) {
			global $oh_object_page;
			$this->page['sidebar'] = $i;
			return $oh_object_page;			
		}
		function is_active_page($link) {			
			$o = false;
			if (oh("string")->endswith(oh("url"),$link)) {
				$o = true;	
			}
			return $o;	
		}
	}
?>
